package com.cloud.pole.weixin.service;

import com.cloud.pole.weixin.model.entity.WxApp;
import com.cloud.pole.weixin.model.entity.WxUser;
import com.cloud.pole.weixin.wechat.domain.AccessToken;
import com.cloud.pole.weixin.wechat.domain.BaseRespMsg;
import com.cloud.pole.weixin.wechat.domain.UserInfo;
import com.cloud.pole.weixin.wechat.message.Msg;

/*
*2019年4月24日
*cloud-weixin
*author:frank-chen
*/
public interface WechatApiService {
		
	public WxUser getWxUserInfoByCode(String code, Integer wxAppId) throws Exception;
		
	public AccessToken getAccessToken(WxApp wxApp) throws Exception;
		
	public void subscribeWxUser(String openId, String appId) throws Exception;
	
	/**
	 * 关注或关键字回复
	 * @param eventType
	 * @param eventKey
	 * @param opendId
	 * @param originalId
	 * @return
	 * @throws Exception
	 */
	public Msg getReplyMsg(String eventType, String eventKey, String openId, String originalId) throws Exception;
	
	public void unSubscribeWxUser(String openId, String originalId) throws Exception;
	
	public BaseRespMsg createMenu(Integer wxAppId) throws Exception;
}
